package com.homestead.controller.req;

import com.homestead.bo.AddOrgBo;
import com.homestead.controller.req.AdaptOrgRequest;
import com.homestead.convert.AbstractConverter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

/**
 * @author HanBin_Yang
 * @since 2021/5/30 9:30
 */
@Data
@ApiModel(description = "添加组织 入参")
public class AddOrgRequest extends AbstractConverter<AddOrgBo> implements Serializable {
    private static final long serialVersionUID = -1174567665707141088L;
    @ApiModelProperty(value = "券活动id", required = true)
    private Long couponThemeId;

    @ApiModelProperty(value = "组织级别 0平台 1集团 2商家 3楼盘", required = true)
    private Integer orgLevel;

    @ApiModelProperty(value = "适用组织列表", required = true)
    private List<AdaptOrgRequest> adaptOrgList;

    @Override
    public AddOrgBo convert() {
        AddOrgBo bo = new AddOrgBo();
        BeanUtils.copyProperties(this, bo);
        return bo;
    }
}
